import jieba

from application.settings import KEY_WORD_PATH

text = "使用VScode安装pip，使用pip安装Python的扩展包"

# 精确模式（默认）
seg_list = jieba.cut(text, cut_all=False)
with open(KEY_WORD_PATH+'/baidu_stopwords.txt', 'r', encoding='utf-8') as f:
    stopwords = set(f.read().split('\n'))

print(set(seg_list)-stopwords)
